const proxy = require('http-proxy-middleware')

module.exports = function (app) {
    app.use(
        proxy(['/v9',], {
            target: 'https://appapi.tesoon.com/v1',
            changeOrigin: true,
            pathRewrite: { '^/v9': '' }
        }),
    )
    app.use(
        proxy(['/v10',], {
            target: 'https://appapi.tesoon.com/v1d1',
            changeOrigin: true,
            pathRewrite: { '^/v10': '' }
        }),
    )
}
